/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 石方旭
 * Date: 2022-06-27
 * Time: 22:57
 */
public class TestDemo {

    public static void main(String[] args) {
        BinarySearchTree binarySearchTree = new BinarySearchTree();
        int[] array = {5,3,4,1,7,8,2,6,0,9};
        for(int i =0;i<array.length;++i){
            binarySearchTree.insert(array[i]);
        }
//        for(int i =0;i<array.length;++i){
//            System.out.print(binarySearchTree.search(array[i]).val+" ");
//        }
        binarySearchTree.remove(7);
        System.out.println();
        System.out.println(binarySearchTree.search(9).val);
        System.out.println();

        
    }
}
